#include "Comm.hpp"
int main()
{
    int wfd = open(Path, O_WRONLY);
    if (wfd < 0)
    {
        cout << "erron:" << errno << "  errorString:" << strerror(errno) << endl;
        return 1;
    }
    string inbuffer;
    while (true)
    {
        cout << "Please Enter your data:";
        getline(cin, inbuffer);
        if(inbuffer == "quit") break;
        int n = write(wfd, inbuffer.c_str(), inbuffer.size());
        if (n < 0)
        {
            cout << "Write fail: errno:" << errno << "  errorString:" << strerror(errno) << endl;
            break;
        }
    }
    close(wfd);
    return 0;
}